1. Field of the Invention
The present invention relates to a microcomputer for controlling real time output, and more specifically to a port output controller for use in such a microcomputer.
2. Description of related art
Microcomputers include one type of microcomputer including a peripheral circuit therein, which is called a "single chip microcomputer" or a "one-chip microcomputer". The peripheral circuit includes an interrupt controller, a direct memory access (DMA) controller, a timer, a serial interface, etc., which are used for control of various systems.
One of these single chip microcomputers includes a peripheral circuit, called a "port output controller", for controlling an output to output terminals (called a "port" hereinafter) externally supplying a waveform used for controlling a motor included in a printer or a facsimile.
This type of single chip microcomputer includes a CPU (central processing unit), an interrupt controller and a port output controller for outputting values of buffer registers to an output port every designated time. The port output controller includes an output latch circuit for latching and outputting data to the output port, and a buffer register receiving data through an internal bus under control of the CPU for temporarily storing data to be outputted to the output port next to the data that is latched in the output latch circuit and therefore is being outputted to the output port. When a predetermined length of time has elapsed after the data is latched into d.about.e output latch circuit, a timing controller controls to update the output latch circuit, namely, to cause the output latch circuit to latch the data temporarily stored in the buffer register.
Here, assume that the port output controller of the above mentioned microcomputer has six ports, and the above mentioned microcomputer is used for controlling a motor by using an output waveform obtained at the six ports, as a three-phase inverter motor driving waveform. Furthermore, assume that the first, second and third ports define non-inverted waveforms of three phases (U-phase, V-phase and W-phase), respectively, and the fourth, fifth and sixth ports define inverted waveforms of the three phases (U*-phase, V*-phase and W*-phase), respectively.
When the microcomputer operates under the above mentioned assumption, it is in some cases that all the ports do not simultaneously change at a port output changing timing. For example, the U-phase (first port) and the U*-phase must simultaneously change. However, when the U-phase (first port) changes from "0" to "1", the U*-phase (fourth port) often changes from "1" to "0" with a delay, due to various differences within the port output controller, such as difference in length of control lines, variation in characteristics of latches, and difference in length of signal lines from the latches to the ports. As a result, the U-phase (first port) and the U*-phase (fourth port) simultaneously become "0" for a momentary period. During this momentary period, a pass-trough current flows through the motor. This is an important problem in control of the motor.
This is also an important problem in the case of controlling a reversible DC motor, since a pass-through current similarly flows when a pair of opposing phases as mentioned above momentarily simultaneously become "0". On the other hand, in the control of a stepping motor, if each pair of opposing phases simultaneously become "1", vibration occurs in a driving magnetic force.
As mentioned above, the conventional port output controller of the microcomputer is not satisfactory in controlling the motor, since the above mentioned problems have been encountered.